<template>
  <div>
    <van-nav-bar title="关于我们">
      <img
        src="~assets/image/arrow_left.png"
        alt=""
        width="20"
        height="20"
        slot="left"
        @click="leftClick"
      />
    </van-nav-bar>
    <div class="aboutus">
      <div class="aboutus-logo">
        <img src="../../assets/logo.png" width="50" height="50" alt="" />
      </div>
      <p class="aboutus-name">{{ oemInfo.name }}</p>
      <p class="aboutus-version">{{ oemInfo.androidVersion }}</p>
      <p class="count">
        随着移动互联网的高速发展，手机里的移动支付应用给日常生活带来极大便利，
        {{ appName }}
        特推出一款可实现无卡支付的掌上钱包——
        {{ appName }}
      </p>
      <p class="count">
        本产品颠覆传统POS机，通过无卡支付技术，实现一键支付;该软件支持支付宝、财付通、易宝、银联、微信和几乎所有的银行卡和信用卡，省去现金交易的不安全性和繁琐性，节约成本、简单易用。商家只需一键安装该软件，输入银行卡号，提供验证即可一键支付，
        {{ appName }}
        对商户进行实名认证，短信认证，为您打造一个绿色、安全、快捷的支付平台。
      </p>
    </div>
    <div class="service" @click="callPhone(oemInfo.brandPhone)">
      <p>客服热线</p>
      <p>{{ oemInfo.brandPhone }}</p>
    </div>
  </div>
</template>
<script>
import { queryOemInfoApi } from "network/ApiServe";
export default {
  data() {
    return {
      oemInfo: {},
    };
  },
  created() {
    this.appName = localStorage.getItem("appName");
    this.brandId = localStorage.getItem("brandId");
  },
  mounted() {
    this.getOemInfo();
  },
  methods: {
    leftClick() {
      this.$router.back(-1);
    },
    getOemInfo() {
      queryOemInfoApi(this.brandId)
        .then((res) => {
          console.log("res:", res);
          if (res.resp_code === "000000") {
            this.oemInfo = res.result;
          }
        })
        .catch((err) => {
          console.log(err);
        });
    },
    callPhone(phoneNumber) {
      window.location.href = "tel://" + phoneNumber;
    },
  },
};
</script>
<style scoped>
.aboutus {
  background-color: #fff;
  padding: 10px;
}
.aboutus-logo {
  text-align: center;
}
.aboutus-name {
  font-weight: 600;
  color: #000;
  text-align: center;
  margin-top: 10px;
}
.aboutus-version {
  text-align: center;
  margin: 10px;
  font-size: 16px;
}
.count {
  font-size: 15px;
  text-indent: 2em;
  letter-spacing: 1.1px;
  line-height: 20px;
}
.service {
  margin-top: 2px;
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  line-height: 30px;
  background-color: #fff;
  font-size: 15px;
}
</style>